
<template>
  <div class="main-container">
    <header>
      <h1>前途无忧 - 人才招聘平台</h1>
      <NavBar/>
      <SearchBar @input = 'handleInput' @search = 'handleSearch'/>
      <JobMenu/>
    </header>

  </div>
</template>

<script>
import NavBar from "@/components/NavBar.vue";
import SearchBar from "@/components/SearchBar.vue";
import JobMenu from "@/components/JobMenu.vue";
export default {
  data() {
    return {
      searchResults: ''
    };
  },
  components: {JobMenu, SearchBar, NavBar},
  methods:{
    handleInput(query) {
      console.log('实时输入:', query);
      // 在这里处理实时输入，比如进行搜索建议等
    },
    handleSearch(query) {
      console.log('搜索:', query);
      // 在这里处理搜索逻辑
      this.searchResults = `你搜索了: ${query}`
    }
  }
}

</script>

<style>
.main-container {
  text-align: center;
  padding: 20px;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
}
</style>